﻿@{
    Layout = null;
    ViewBag.Title = "值班明细表";
}

<!DOCTYPE html>

<html>
<head>
    <title>值班明细表</title>
    @Html.Partial("LoadPanelPartial")
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <script>
        if (top.boardtop) {
            top.boardtop.head_txt.innerText = "征收期维护";
        }
    </script>

    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
        new StyleSheet { ExtensionType = ExtensionType.ListBox }
    )
    @Html.DevExpress().GetScripts(
         new Script { ExtensionType = ExtensionType.ListBox }
    )

    <style type="text/css">
       html, body
        {
          /*  padding: 0px;
            margin: 0px;
            height: 100%;
            width: 100%;*/
            font-size: 12px;
        }
        .tb1
        {
            
            width: 98%;
            height: 98%;
            border-style: solid;
            border-color: #0099ff;
            text-align: center;
        }
        tr
        {
            height: 90px;
        }
        td
        {
            width: 13%;
            vertical-align: top;
            border-color: #0099ff;
        }
        .div
        {
            background-color: yellow;
        }
        table tr td div
        {
            width: 98%;
            height: 98%;
            cursor: pointer;
            
           
        }
    </style>

    <script type="text/javascript">
        function datePrev() {
            $('#hdMethod').val("1");
            form1.submit();
        }
        function dateNext() {
            $('#hdMethod').val("2");
            form1.submit();
        }

        $(function () {
            $("table tr td div").each(function () {
                $(this).click(function () {
                    var obj = new Object();
                    obj = $('#hdCurrentDate').val() + $(this).attr("id") + "日";
                    var rs = window.showModalDialog(rootPath + "/Admin/HRWatchSchedule/HRWatchScheduleAdd", obj, "dialogWidth=500px;dialogHeight=400px")
                    if (typeof (rs) != "undefined") {
                        if (rs == "success") {
                            $('#hdMethod').val("0");
                            form1.submit();
                        }
                    }
                });



                if ($(this).text().length > 3) {
                    $(this).addClass("div");
                }
            });

        });
    </script>
</head>
<body>
    @using (Html.BeginForm("BtnPrevNext", "HRWatchSchedule", FormMethod.Post, new { id = "form1", @class = "tableFrom" }))
    {
        <div>
            <div>
                <table cellpadding="0" cellspacing="0" border="0" style="text-align: center; width: 98%; font-size: 30px; height: 70px;" rules="none">
                    <tr style="height: 50px;">
                        <td>
                            <input type="button" id="btnPrev" value="<<" onclick="datePrev()" style="width:100px; cursor:pointer"/>
                        </td>
                        <td colspan='5'>
                            @Html.Raw(@ViewData["currentDate"].ToString())
                            @Html.Hidden("hdCurrentDate", @ViewData["currentDate"])
                        </td>
                        <td>
                            <input type="button" id="btnNext" value=">>" onclick="dateNext()" style=" width:100px;cursor:pointer"/>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="content">
                @Html.Raw(@ViewData["scheduleTable"].ToString());
            </div>
        </div>
        @Html.Hidden("hdMethod")
    }
</body>
</html>
